﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="ConfirmSendList.aspx.cs" Inherits="BookingManage_ConfirmSendList" Title="确认发送" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script language="javascript" type="text/javascript">
    function selectAll()
    {
        var a = document.getElementsByTagName("input");
        var all = document.getElementById("alls");
        for (var i=0; i<a.length; i++)
        {
            if(all.checked)
            {
                if (a[i].type == "checkbox") 
                {
                    a[i].checked = true;
                }
            }
            else
            {
                if (a[i].type == "checkbox") 
                {
                    a[i].checked = false;
                }
            }
        }
    }
    function cancelAll()
    {
        var a = document.getElementsByTagName("input");
        for (var i=0; i<a.length; i++)
        {
            if (a[i].type == "checkbox") 
            {
                a[i].checked = false;
            }
        }
    }
</script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="title"><asp:Label ID="lblConfirmSend" runat="server" Text="确认发送" 
            meta:resourcekey="lblConfirmSendResource1"></asp:Label></div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="list_title">
             <div class="autoleft">
                <asp:Label ID="llblTitle" runat="server" Text="您选择了以下待发送的Booking：" 
                     meta:resourcekey="llblTitleResource1"></asp:Label></div>
                     </div>
            <div style="overflow:auto; width:100%; height:400px; padding:1px;">
            <asp:GridView ID="gvPendingList" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvPendingList_RowDataBound"
                Width="100%" CssClass="tblGridView" meta:resourcekey="gvPendingListResource1">
                <Columns>
                    <asp:TemplateField meta:resourcekey="TemplateFieldResource1">
                        <HeaderTemplate>
                            <input type="checkbox" checked="checked" id="alls" name="all" onclick="selectAll()" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <input type="checkbox" name="chkSelected" checked="checked" 
                                value='<%# DataBinder.Eval(Container.DataItem,"PKID") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="序号" meta:resourcekey="TemplateFieldResource1">
                            <ItemTemplate>
                                <asp:Label ID="lblNo" runat="server" Text='<%# (Container as GridViewRow).RowIndex + 1 %>'
                                    meta:resourcekey="lblNoResource2"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="托运人" meta:resourcekey="TemplateFieldResource2">
                        <ItemTemplate>
                            <asp:Label ID="lblShipper" runat="server" Text='<%# Eval("Shipper") %>' 
                                meta:resourcekey="lblShipperResource1"></asp:Label>
                            <asp:Label ID="lblHKShipper" runat="server" Text='<%# Eval("HKShipper") %>' 
                                meta:resourcekey="lblShipperResource1"></asp:Label>
                            <asp:Label ID="lblENGShipper" runat="server" Text='<%# Eval("ENGShipper") %>' 
                                meta:resourcekey="lblShipperResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="工厂" meta:resourcekey="tfrVendor">
                        <ItemTemplate>
                            <asp:Label ID="lblVendor" runat="server" Text='<%# Eval("Vendor") %>'></asp:Label>
                            <asp:Label ID="lblHKVendor" runat="server" Text='<%# Eval("HKVendor") %>'></asp:Label>
                            <asp:Label ID="lblENGVendor" runat="server" Text='<%# Eval("ENGVendor") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="SO_NO" meta:resourcekey="TemplateFieldResource3">
                        <ItemTemplate>
                            <asp:Label ID="lblSONO" runat="server" Text='<%# Eval("SONO") %>' 
                                meta:resourcekey="lblSONOResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="PN#" meta:resourcekey="TemplateFieldResource4">
                        <ItemTemplate>
                            <asp:Label ID="lblPNNO" runat="server" Text='<%# Eval("PNNO") %>' 
                                meta:resourcekey="lblPNNOResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="W Start" 
                        meta:resourcekey="TemplateFieldResource5">
                        <ItemTemplate>
                            <asp:Label ID="lblWinStart" runat="server" 
                                Text='<%# Eval("WinStart", "{0:yyyy-MM-dd}") %>' 
                                meta:resourcekey="lblWinStartResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="W Closed" 
                        meta:resourcekey="TemplateFieldResource6">
                        <ItemTemplate>
                            <asp:Label ID="lblWinClose" runat="server" 
                                Text='<%# Eval("WinClose", "{0:yyyy-MM-dd}") %>' 
                                meta:resourcekey="lblWinCloseResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="JobDate">
                        <ItemTemplate>
                            <asp:Label ID="lblJobDate" runat="server" 
                                Text='<%# Eval("JobDate", "{0:yyyy-MM-dd}") %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="WHSE/TML" 
                        meta:resourcekey="TemplateFieldResource7">
                        <ItemTemplate>
                            <asp:Label ID="lblWhouse" runat="server" Text='<%# Eval("Whouse") %>' 
                                meta:resourcekey="lblWhouseResource1"></asp:Label>
                            <asp:Label ID="lblHKWhouse" runat="server" Text='<%# Eval("HKWhouse") %>' 
                                meta:resourcekey="lblWhouseResource1"></asp:Label>
                            <asp:Label ID="lblENGWhouse" runat="server" Text='<%# Eval("ENGWhouse") %>' 
                                meta:resourcekey="lblWhouseResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Movement" 
                        meta:resourcekey="TemplateFieldResource8">
                        <ItemTemplate>
                            <asp:Label ID="lblFCLLCL" runat="server" Text='<%# Eval("FCLLCL") %>' 
                                meta:resourcekey="lblFCLLCLResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="ITEM" meta:resourcekey="TemplateFieldResource9">
                        <ItemTemplate>
                            <asp:Label ID="lblItemNO" runat="server" Text='<%# Eval("ItemNO") %>' 
                                meta:resourcekey="lblItemNOResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="PCS" meta:resourcekey="TemplateFieldResource10">
                        <ItemTemplate>
                            <asp:Label ID="lblPCS" runat="server" Text='<%# Eval("PCS") %>' 
                                meta:resourcekey="lblPCSResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="CTN" meta:resourcekey="TemplateFieldResource11">
                        <ItemTemplate>
                            <asp:Label ID="lblCTN" runat="server" Text='<%# Eval("CTN") %>' 
                                meta:resourcekey="lblCTNResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="VOL" meta:resourcekey="TemplateFieldResource12">
                        <ItemTemplate>
                            <asp:Label ID="lblVOL" runat="server" Text='<%# Eval("VOL") %>' 
                                meta:resourcekey="lblVOLResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Weight" 
                        meta:resourcekey="TemplateFieldResource13">
                        <ItemTemplate>
                            <asp:Label ID="lblGrossWT" runat="server" Text='<%# Eval("GrossWT") %>' 
                                meta:resourcekey="lblGrossWTResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="5%" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle HorizontalAlign="Center"/>
                <RowStyle HorizontalAlign="Center" />
            </asp:GridView>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <table style="width: 100%">
        <tr><td><asp:Label ID="lblError" runat="server" Visible="False" Text="请选择要发送的记录!" 
                ForeColor="Red" meta:resourcekey="lblErrorResource1"></asp:Label></td></tr>
        <tr><td width="100%" align=right>
            <asp:Label ID="lblConfirm" runat="server" Text="确定要发送？" ForeColor="Red" 
                meta:resourcekey="lblConfirmResource1"></asp:Label>
            &nbsp;<asp:Button ID="btnSend" runat="server" Text="Send" CssClass="btn" 
                OnClick="btnSend_Click" meta:resourcekey="btnSendResource1" />
            &nbsp;&nbsp;<asp:Button ID="btnReturn" runat="server" Text="返回" CssClass="btn" 
                OnClick="btnReturn_Click" meta:resourcekey="btnReturnResource1" />
        </td></tr>
    </table>
    
</asp:Content>
